package ti27;

import java.util.Random;

public class Test {


    public static void main(String[] args) {
        Love[] loves = new Love[7];
        Test test = new Test();
        Random random = new Random();
        String  text = "姓名"+ "喜爱度\n";
        String[] str = {"张三", "张4", "张5", "张6", "张7", "张8", "张9"};


        for (int i = 0; i < str.length; i++) {
            int preference1 = random.nextInt(101);
            loves[i] = new Love(str[i],preference1);
            text += loves[i].getName()+"   "+loves[i].getPreference()+"%\n";

        }
        System.out.println(text);

    }
}
